<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{.Title}}</title>
    <script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" >
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
    <script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="//cdn.bootcss.com/jquery-json/2.6.0/jquery.json.min.js"></script>
    <script src="//cdn.bootcss.com/layer/3.0.1/layer.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <p class="text-right" style="margin: 20px">
            你好，{{.Body.user.UserName}} <a href="/logout">退出</a></p>
        <hr/>
    </div>

    <div class="row">
        <div class="col-md-2">
            <div class="list-group">
                <a href="/index" id="menu_main" class="list-group-item text-center">
                    任务列表
                </a>
                <a href="/userList" id="menu_user" class="list-group-item text-center">
                    管理员列表
                </a>
                <a href="/config" id="menu_config" class="list-group-item text-center">
                    配置信息
                </a>
                <a href="/logInfo" id="menu_log" class="list-group-item text-center">
                    系统日志
                </a>
            </div>
        </div>
        <div class="col-md-10">
            {{ yield }}
        </div>
    </div>
</div>
</body>
<script type="application/javascript">
    url=location.href.replace("http://"+location.host,"");
    var name = "menu_main";
    if (url=="/"||url=="/index") {
        name = "menu_main"
    }
    if (url=="/userList") {
        name = "menu_user"
    }
    if (url=="/config") {
        name = "menu_config"
    }
    if (url=="/logInfo") {
        name = "menu_log"
    }
    $("#" + name).addClass("list-group-item-success")
</script>
</html>